<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\BatchWithdraw
 *
 * @property int $id
 * @property string $batch_number
 * @property string $ali_batch_id
 * @property int $batch_count
 * @property string $batch_amount
 * @property string|null $payer alipay
 * @property string|null $payer_id
 * @property string|null $detail
 * @property string $status
 * @property string|null $remark
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Withdraw[] $withdraws
 * @property-read int|null $withdraws_count
 * @method static \Database\Factories\BatchWithdrawFactory factory(...$parameters)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw query()
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereAliBatchId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereBatchAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereBatchCount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereBatchNumber($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereDetail($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw wherePayer($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw wherePayerId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereRemark($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereStatus($value)
 * @mixin \Eloquent
 * @property int $success_count
 * @property string $success_amount
 * @property int $failed_count
 * @property string $failed_amount
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereFailedAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereFailedCount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereSuccessAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereSuccessCount($value)
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BatchWithdraw whereUpdatedAt($value)
 */
class BatchWithdraw extends Model
{
    use HasFactory;
    
    protected $guarded = ['id'];
    
    public function withdraws()
    {
    	return $this->hasMany(Withdraw::class, 'batch_withdraw_id', 'id');
    }
}
